<?

function conectar_a($tarea){
switch ($tarea) {
	case "GIS" :
		$conexion = "user=geoazul password=digasigenlinea2007 dbname=geoazul host=192.168.252.45 port=4000";
		$cxsig = pg_connect($conexion) or die('No pudo conectarse: ' . pg_last_error());//SIG
		return $cxsig;
		break;
	case "GIS_LIMA" :
		$conexion = "user=conazul password=luzanoc dbname=lima host=192.168.252.45 port=4000";
		$cxsig = pg_connect($conexion) or die('No pudo conectarse: ' . pg_last_error());//SIG peru
		return $cxsig;
		break;
	case "LECTURA" :
		$cxlectura = ora_logon("consulta","consulta","//192.168.252.44/SITIO");
		return $cxlectura;
		break;
	case "REVISIONES_INTERNAS_T8" :
		$cxlectura = ora_logon("consulta","consulta","//192.168.252.44/SITIO");
		return $cxlectura;
		break;
	case "REVISIONES_INTERNAS_T1" :
		$cxlectura = ora_logon("consulta","consulta","//192.168.252.44/SITIO");
		return $cxlectura;
		break;
	case "REVISIONES_INTERNAS_T3" :
		$cxpqrs = ora_logon("consulta","consulta","//192.168.252.40/PQRS");
		return $cxpqrs;
		break;
	case "SUSPENSIONES" :
		$cxcortes = ora_logon("consulta","consulta","//192.168.252.184/CORTES");
		return $cxcortes;
		break;
	case "REINSTALACIONES" :
		$cxcortes = ora_logon("consulta","consulta","//192.168.252.184/CORTES");
		return $cxcortes;
		break;
	case "TAPONAMIENTOS" :
		$cxcortes = ora_logon("consulta","consulta","//192.168.252.184/CORTES");
		return $cxcortes;
		break;
	case "PQRS" :
		$cxpqrs = ora_logon("consulta","consulta","//192.168.252.40/PQRS");
		return $cxpqrs;
		break;
	case "SOLICITUDES" :
		$cxsolicitudes = odbc_connect ("solicitudes", "", "");
		return $cxsolicitudes;
		break;
	case "REPARTO" :
		$cxreparto = odbc_connect ("reparto", "", "");
		return $cxreparto;
		break;
	case "CAMBIO_MEDIDOR" :
		$cxcambio = ora_logon("acom","acom","//192.168.252.101/APLIC");
		return $cxcambio;
		break;
    case "ACOMETIDAS" :
		$cxcambio = ora_logon("acom","acom","//192.168.252.101/APLIC");
		return $cxcambio;
		break;
   	case "RECONEXIONES" :
		$cxcambio = ora_logon("acom","acom","//192.168.252.101/APLIC");
		return $cxcambio;
		break;
    case "CORRIDA_CAJILLA" :
		$cxcambio = ora_logon("acom","acom","//192.168.252.101/APLIC");
		return $cxcambio;
		break;
	}
}

?>